<?php
namespace app\common\model\user;

use think\Model;

class TaskLog extends Model
{
    protected $table = 'tasklog';
    protected $pk    = 'Id';
    // 添加日志
    public function saveData($data)
    {
        $this->Type = $data['Type'];
        $this->Content = $data['Content'];
        $this->ResContent = isset($data['ResContent'])?$data['ResContent']: '';
        $this->UserId = $data['UserId'];
        $this->CreateTime = time();
        $this->save();
        $rst = [
            'Id' => $this->Id,
        ];
        return $rst;

    }
}
